﻿// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
// Website: https://admin.blazor.zone

using BlazorAdmin.Models;
using System.Collections.Generic;

namespace BlazorAdmin.Interface
{
    /// <summary>
    /// 
    /// </summary>
    public interface IGroup
    {
        /// <summary>
        /// 获得所有用户
        /// </summary>
        /// <returns></returns>
        List<SysGroup> GetAll();

        /// <summary>
        /// 
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        List<int> GetGroupsByUserId(int userID);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="groupIds"></param>
        /// <returns></returns>
        bool SaveGroupsByUserId(int userId, IEnumerable<int> groupIds);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        List<int> GetGroupsByRoleId(int roleId);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="roleId"></param>
        /// <param name="groupIds"></param>
        /// <returns></returns>
        bool SaveGroupsByRoleId(int roleId, IEnumerable<int> groupIds);
    }
}